import 'package:flutter/material.dart';

class CircleImageAndText extends StatelessWidget {
  final String path;
  final String text;
  final double width;
  final double height;

  CircleImageAndText(this.path, this.text, {this.width, this.height});
  

  @override
  Widget build(BuildContext context) {
    return new Container(
      color: Colors.white,
      child: new Column(
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        children: <Widget>[
          new ClipOval(
            //这个一般可以作为圆形的裁剪哦。
            child: new SizedBox(
              width: this.width ?? 40.0,
              height: this.height ?? 40.0,
              child: Container(
                child: new Image.asset(
                  this.path,
                  fit: BoxFit.fill,
                ),
              ),
            ),
          ),
          new Padding(padding: new EdgeInsets.only(bottom: 5.0),),
          new Text(
            this.text,
            style: TextStyle(
                color: Color(0xFF757575),
                fontSize: 13.0,
                fontWeight: FontWeight.bold),
          )
        ],
      ),
    );
  }
}
